clarifications about Rmd section files#20
Open
KevCaz wants to merge 1 commit into
Open
Conversation
Collaborator
|
Thank you for this Kevin. At the moment we are still making modifications to each of the sub sections, so I will keep headers on those for now until everything is polished, then I will remove all unnecessary scripts. Great suggestion for the figure captions. I didn't know about this and was worried about the figure numbers. Happy to hear about the automated numbering. Makes sense. |
Author
Makes sense! Let's keep this PR open in the meanwhile, so I can keep editing it if necessary. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I created this PR for illustrative purposes only, no need to merge it.
First one clarification about how the report will be customized. The application will insert code chunks using the option
childin the main/generic document. The main document should include INTRO + END (I merge the two documents in this PR). Therefore, there is no need to repeat the first code chunks, because everything will be combined into a singleRmddocument before rendering it. So you can remove the header and the first code chunks in allRmdbut the main one (I did for SearchPEZ/code/report_pt2_SAR_dist_crithab_EN.Rmd as an example)!Another important comment is that you are adding caption below manually below code chunks that generate figure I would recommend using the code chunk option
fig.capinstead, I did it for the 1st figure in SearchPEZ/code/report_pt1_generic_intro_EN.Rmd (l.181). Note thatkable()also allow you to add caption to tables. This will number figures and tables properly, irrespective of the number of sections added.Two tiny details :
if
include = FALSEis used then no need forecho = FALSE, see this blog post.using
rm(list=ls(all=TRUE))may be problematic here, and I would recommend against using this for the report. This should rather be part of the guidelines, i.e. the user should be aware that the objects in its R session may interfere with the generation of the report. That said, I will probably generate the report in a different R session, so anyway no need for this!